package com.mycompany.lctwitter.action;

import java.util.Map;

import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.apache.struts2.interceptor.SessionAware;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
@Controller
@Scope("prototype")
@Results( { @Result(name = Action.LOGIN, type = "redirect", location = "/user/login-page") })
public class AbstractAction extends ActionSupport implements SessionAware {

	public static final String LOGINED_USER = "loginedUser";

	protected Map<String, Object> session;

	@Override
	public void setSession(Map<String, Object> session) {
		this.session = session;
	}

	@Override
	public String execute() {
		return SUCCESS;
	}
}
